

/** 请求 */
// @ts-ignore
const request = (option: unknown) => uni.$http.create().setConfig({ ...option, showLoading: false }).request();


/** api */
export default {
	/** 课程详情 */
	getCourseDetail_api: <T>(data: Record<string, unknown>) => request({ url: '/learn', data }) as T,
	
	/** 课程列表 */
	getCourseList_api: <T>(data: Record<string, unknown>) => request({ url: '/course/list', data }) as T,
	
	/** 结课 */
	learnFinish: <T>(data: Record<string, unknown>) => request({ url: '/learn/finish', method: 'post', data }) as T,
	
	/** 词汇统计 */
	getWordsCount_api: <T>(data: Record<string, unknown>) => request({ url: '/statistics/words-count', data }) as T,
	
	/** 开始学习 */
	postStudy_api: <T>(data: Record<string, unknown>) => request({ url: '/learn/start', data, method: 'post' }) as T,
	
	/** 修改课程 */
	edirlearnCourse: <T>(data: Record<string, unknown>) => request({ url: '/learn/course', method: 'put', data }) as T,
	
	/** 结束学习 */
	postFinish_api: <T>(data: Record<string, unknown>) => request({ url: '/learn/finish', data, method: 'post' }) as T,
	
	/** 词汇列表 */
	getWordsList_api: <T>(data: Record<string, unknown>) => request({ url: '/course-vocabulary/list-page', data }) as T,
	
	
	/** 提交学习记录 */
	postLearnSubmit_api: <T>(data: Record<string, unknown>) => request({ url: '/learn/record', data, method: 'post' }) as T,
	
	/** 词汇统计记录 */
	getWordsCountRecord_api: <T>(data: Record<string, unknown>) => request({ url: '/statistics/course-learn-record', data }) as T
};